<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p id="content"></p>
</body>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
    function GetQueryString(name)
    {
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
    $(function () {
//        $("#content").text(location.search)
        var code = GetQueryString("code");
        var state = GetQueryString("state");
       $.ajax({
           url: "http://i2se3v.natappfree.cc/auth/weiXin",
           type: "GET",
           data: {code: code, state: state},
           success: function (response) {
               $("#content").text(JSON.stringify(response))
           }
       });
    });
</script>
</html>